﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<%@ include file="/include/include.jsp" %>
<script type="text/javascript">

	function change() {
		var t = document.getElementById("startTime").value;
		var t1 = document.getElementById("endTime").value;

	}
	function init() {
		var time = new Date();
		var year = time.getFullYear();
		var month = time.getMonth() + 1;
		var day;
		if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8
				|| month == 10 || month == 12) {
			day = 31;
		} else if (month == 4 || month == 6 || month == 9 || month == 11) {
			day = 30;
		} else {
			if(year/100==0){
				if (year/400==0) {
					day = 29;
				} else {
					day = 28;
				}
			}else{
				if (year / 4 == 0) {
					day = 29;
				} else {
					day = 28;
				}
			}
			
		}
		if(month<=10){
			month="0"+month;
		}
		var startTime = year + "-" + month + "-0" + 1;
		var endTime = year + "-" + month + "-" + day;
		if(document.getElementById("startTime").value==""){
			document.getElementById("startTime").value = startTime;
		}
		if(document.getElementById("endTime").value==""){
			document.getElementById("endTime").value = endTime;
		}		
	}
</script>
</head>

<body onload="init()">
	
	<%@ include file="/include/header.jsp" %>

	<%@ include file="/include/menu.jsp" %>
	
	<%@ include file="/include/context.jsp" %>
			
	<div id="mainContent">

		<h2><a href="${ctx}/${menu.url}">${menu.description}</a>&nbsp;-&nbsp;<a href="${ctx}/${submenu.url}">${submenu.description}</a></h2>
		
		<div class="tool-bar">
			<form method=post action="${ctx}/system/treport/list">		
			<div><input id="chaxunId" onclick="change()" type="submit" value="查询"></input></div>		
			<div>结束日期<input id="endTime" name="endTime" class="Wdate" type="text" onClick="WdatePicker({skin:'whyGreen'})" value="${endTime}"/></div>
			<div>开始日期<input id="startTime" name="startTime" class="Wdate" type="text" onClick="WdatePicker({skin:'whyGreen'})" value="${startTime }"/></input></div>
		    </form>
		</div>
		
		<div class="grid-list">
			<table class="grid" cellspacing="0" url="${ctx}/system/treport/list">
				<thead>
					<tr>
						<!--<td><input type="checkbox" name="aaa" onclick="clearAll(this,'idss')"/></td>
						--><td>开始日期</td>
						<td>结束日期</td>
						<td>部门</td>
						<td>姓名</td>
						<td>公司签到次数</td>
						<td>外勤签到次数</td>
						<td>合计次数</td>
						<td>工作时长（小时）</td>
						<td>迟到（含晚到）次数</td>
						<td>请假次数</td>
						<td>早退次数</td>
						<td>实际出勤天数</td>					
						<td>应出勤天数</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="po" items="${treport}">
							<!--<td><input type="checkbox" name="idss"  value="${po.id}"/></td>
							-->
							<td>${po.startname}</td>
							<td>${po.endname}</td>
							<td>${po.department}</td>
							<td>${po.username}</td>
							<td>${po.comcount}</td>
							<td>${po.outcount}</td>
							<td>${po.attendancecount}</td>
							<td>${po.timetotal}</td>
							<td>${po.latecount}</td>
							<td><font color = "green"><b>${po.leavecount}</b></font></td>
							<td>${po.zaotui}</td>
							<td>${po.sjnumber}</td>
							<td>${po.ynumber}</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<t:page action="${ctx}/system/treport/list" />
		</div>
	</div>
	
	<%@ include file="/include/script.jsp" %>

</body>

</html> 